#pragma once

#include "framework.h"
#include "utils.h"
#include "particle.h"
#include "includes.h"
#include "Instance.h"
#include <iostream>

//generic pSystem
class pSystem
{
private:
	

public:
	unsigned long lastElapsed;
	long created;
	std::vector<Particle*> data;
	Vector3 origen;
	Instance* following;
	Vector3 offset;
	double size;
	double size_max;
	bool alive;

	pSystem(void);
	~pSystem(void);
	virtual void create(Vector3 _origen,int _number) = 0;
	virtual void recalc();
	virtual void render() = 0;
	void setFollowing(Instance* _instance, Vector3 _offset);
};

//engine particle system
class enginePS : public pSystem
{
public:
	Vector3 color;
	void create(Vector3 _origen, int _number){};
	void create(int _number, Instance * _following, Vector3 _offset, double _size);
	void recalc();
	void render();

};

//bullet hit explossion
class explossionPS : public pSystem
{
public:
	void create(Vector3 _origen, int _number);
	void recalc();
	void render();
	
};

//when ship explossion
class shipExplossionPS : public explossionPS
{
public:
	void create(Vector3 _origen, int _number);
};
//ring like explossion
class ringExplossionPS : public explossionPS
{
public:
	void create(Vector3 _origen, int _number);
};
